//
//  TableV.h
//  
//  jhf
//
//  Created by 计海峰 on 2020/3/29.
//  Copyright © 2020 计海峰. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TableVCVM.h"

NS_ASSUME_NONNULL_BEGIN

@interface TableV : UITableView

// 延时 realod table 信号
@property (nonatomic, assign) NSInteger reloadCount;
@property (nonatomic, strong) RACSubject *delayReloadSubject;

//MARK:- tap empty config
@property (nonatomic, assign) BOOL enableEmptyConifg; // default false
@property (nonatomic, strong) CPEmptyDataConfig *emptyConifg;

//MARK:- 下拉上拉
@property (nonatomic, assign) BOOL enablePull; // default false
@property (nonatomic, assign) BOOL enablePush; // default false
@property (nonatomic, assign) int pagesize; // default 10

//MARK:- tap empty
@property (nonatomic, assign) BOOL enableTapEmpty;  // default false
@property (nonatomic, assign) BOOL enableLongPress; // default false


/// 是否待刷新
@property (nonatomic, assign) BOOL isRefreshIng;

/// 节流时间 默认0.3
@property (nonatomic, assign) CGFloat throttleTime;


// MARK:- class初始化
+ (instancetype)vWithClassStr:(NSString *)clsStr ;

+ (instancetype)vWithClassStr:(NSString *)clsStr model:(id)model ;

+ (instancetype)vWithClass:(Class)cls ;

+ (instancetype)vWithClass:(Class)cls model:(id)model ;

//MARK:- key value
@property (nonatomic, strong, readonly) NSArray <NSString *>*keys;
@property (nonatomic, strong, readonly) NSArray *values;


@property (strong, nonatomic) TableVCVM *vm;

//MARK: - 默认方法
// 配置keys和values
- (void)configKeys:(NSArray <NSString *> *)keys values:(NSArray *)values;

// 绑定的key
@property (nonatomic, copy) NSString *bindKey;

@end

NS_ASSUME_NONNULL_END
